{% extends 'base.html' %}
{% block title%} Projects {% endblock %}


{% block content %} 


<div class="criteria">
	<b>Project Search:</b>
	<div id="project_search_crit">
	
	<form action="/projects/" method="get">
		<div>
			<label for="id_name">Project Name:</label>{{ criteria.name }}
		</div>
		<input type="submit" value="Search">
	</form>
	</div>
</div>
<div class="results">
<b> Projects: </b>
	<table class="data-table"><tbody>
	<tr> <th>Name</th> <th>Completion Date</th> <th>View</th> <th>Edit</th><th>Delete</th> </tr>
	{% for p in projects %}
		<tr class={% cycle '' 'alt' %}>
			<td>{{ p.name }}</td> 
			<td>{{p.completionDate}}</td>
			<td><a href='/project/view/{{ p.pk }}/'> View</a></td> 
			<td><a href='/project/edit/{{ p.pk }}/'> Edit</a></td>
			<td><a href='/project/confirmdelete/{{ p.pk }}/'> Delete</a></td>
		</tr>
	{% endfor %}
	</tbody></table>
	
		<div id="add_project"><a href="/project/new/">Add New Project</a></div>
	
</div>
{% endblock %}